﻿using System.Windows;
using System.Windows.Media.Animation;

namespace HuiZe.education.Resource.Controls
{
    public class HuiZeWindow : Window
    {
        public bool ShowDialogResult { get; set; } = false;

        public HuiZeWindow()
        {
            ShowInTaskbar = false;
            IsVisibleChanged += HuiZeWindow_IsVisibleChanged;
        }

        private void HuiZeWindow_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if ((bool)e.NewValue)
            {
                BeginAnimation(OpacityProperty, (DoubleAnimation)FindResource("show"));
            }
        }
    }
}
